import request from '@/utils/request'

const api_name = '/admin/hosp/hospitalSet'

export default {
    //分页条件查询医院设置
    pageQuery(page, limit, searchObj) {
        return request({
            url: `${api_name}/pageQuery/${page}/${limit}`,
            method: 'post',
            data: searchObj  //用json传递
        })
    },
    //删除医院设置
    delHospSetById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'delete'
        })
    },
    //新增医院设置
    save(hospitalSet) {
        return request({
            url: `${api_name}/save`,
            method: 'post',
            data: hospitalSet  //用json传递
        })
    },
    //根据id查询医院设置
    getHospSetById(id) {
        return request({
            url: `${api_name}/getHospSetById/${id}`,
            method: 'get'
        })
    },
    //修改医院设置
    update(hospitalSet) {
        return request({
            url: `${api_name}/update`,
            method: 'post',
            data: hospitalSet  //用json传递
        })
    },
    //批量删除医院设置
    batchRemoveByIds(ids) {
        return request({
            url: `${api_name}/batchRemove`,
            method: 'delete',
            data: ids  //用json传递
        })
    },
    //锁定和取消锁定
    lockHospSet(id, status) {
        return request({
            url: `${api_name}/lockHospitalSet/${id}/${status}`,
            method: 'put'
        })
    }

}